import unittest
from parameterized import parameterized
import json

from parameter_data import lest_data


def list1():
    lis1 = [(10, 20, 30), (20, 20, 40), (15, 20, 35)]
    return lis1


with open("test1.json") as j:
    lis2 = json.load(j)
unm2 = []
# unm3={}
for i in lis2:
    unm = (i.values)
    unm2.append(unm)


def add(x, y):
    return x + y


class TestAdd(unittest.TestCase):
    @parameterized.expand(lest_data)
    def test01_add(self, x, y, exp):
        print("x={},y={},exp={}".format(x, y, exp))
        res = add(x, y)
        self.assertEqual(exp, res)
